package com.drink.yan.intf.entity;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.drink.yan.intf.entity.io.SpeWorkDetailIo;
import com.drink.yan.intf.entity.io.SpecialLevelIo;
import com.meta.framework.copy.Copyable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * java类简单作用描述
 *
 * @Title:
 * @Package: com.drink.yan.core.mapper.
 * @Author: M.simple
 * @Remark: The modified content
 * @CreateDate: 2023-11-26 18:44
 * @Version: v2.0
 */
@TableName(value = "yan_master_special", autoResultMap = true)
@Data
public class YanMasterSpecial extends SpecialLevelIo {

	@TableId(value = "special_id", type = IdType.AUTO)
	private Long specialId;

	@ApiModelProperty("第一级")
	@TableField(value = "level1_code")
	private String level1Code;

	@ApiModelProperty("第一级")
	@TableField(value = "level1_name")
	private String level1Name;

	@ApiModelProperty("第二级")
	private String level2Code;

	@ApiModelProperty("第二级")
	private String level2Name;

	@ApiModelProperty("专业")
	private String specialCode;

	@ApiModelProperty("专业")
	private String specialName;

	@ApiModelProperty("学位类型")
	private String degreeType;

	@ApiModelProperty("学位类型")
	private String degreeTypeName;

	@ApiModelProperty("介绍")
	private String info;

	@ApiModelProperty("就业方向")
	private String workRemark;

	@TableField(value = "city_content", typeHandler = FastjsonTypeHandler.class)
	@ApiModelProperty("城市分布")
	private List<SpeWorkDetailIo> cityContent;

	@TableField(value = "salary_content", typeHandler = FastjsonTypeHandler.class)
	@ApiModelProperty("薪资情况")
	private List<SpeWorkDetailIo> salaryContent;

	@TableField(value = "industry_content", typeHandler = FastjsonTypeHandler.class)
	@ApiModelProperty("行业分布")
	private List<SpeWorkDetailIo> industryContent;

	@TableField(value = "company_content", typeHandler = FastjsonTypeHandler.class)
	@ApiModelProperty("公司分布")
	private List<SpeWorkDetailIo> companyContent;

	private String delFlag;

	public static void main(String[] args) {
		String s = "[{\"key\": \"高级嵌入式软件工程师\", \"value\": 179000}, {\"key\": \"单片机软件工程师\", \"value\": 152000}]";
		List<SpeWorkDetailIo> speWorkDetailIos = JSONObject.parseArray(s, SpeWorkDetailIo.class);
	}
}
